package com.cet.designapplication.prototype;

/**
 * @author NSOC
 */
public class DeepCopyTest {
    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        teacher.setTeacherName("李华");
        Student student = new Student();
        student.setStudentName("张三");
        teacher.setStudent(student);

        Teacher copy = teacher.copy();

        teacher.setTeacherName("小李华");
        student.setStudentName("小张三");
        System.out.println(teacher);
        System.out.println(copy);
    }
}
